<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>pybindgen.settings</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="pybindgen-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="pybindgen-module.html">Package&nbsp;pybindgen</a> ::
        Module&nbsp;settings
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="pybindgen.settings-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="pybindgen.settings-module.html">Module pybindgen.settings</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno"> 1</tt>  <tt class="py-line"><tt class="py-comment"># pylint: disable-msg=W0105</tt> </tt>
<a name="L2"></a><tt class="py-lineno"> 2</tt>  <tt class="py-line"> </tt>
<a name="L3"></a><tt class="py-lineno"> 3</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L4"></a><tt class="py-lineno"> 4</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L5"></a><tt class="py-lineno"> 5</tt>  <tt class="py-line"><tt class="py-docstring">Global settings to the code generator.</tt> </tt>
<a name="L6"></a><tt class="py-lineno"> 6</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L7"></a><tt class="py-lineno"> 7</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L8"></a><tt class="py-lineno"> 8</tt>  <tt class="py-line"> </tt>
<a name="L9"></a><tt class="py-lineno"> 9</tt>  <tt class="py-line"><tt id="link-0" class="py-name" targets="Variable pybindgen.settings.name_prefix=pybindgen.settings-module.html#name_prefix"><a title="pybindgen.settings.name_prefix" class="py-name" href="#" onclick="return doclink('link-0', 'name_prefix', 'link-0');">name_prefix</a></tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt>
<a name="L10"></a><tt class="py-lineno">10</tt>  <tt class="py-line"><tt class="py-string">"""</tt> </tt>
<a name="L11"></a><tt class="py-lineno">11</tt>  <tt class="py-line"><tt class="py-string">Prefix applied to global declarations, such as instance and type</tt> </tt>
<a name="L12"></a><tt class="py-lineno">12</tt>  <tt class="py-line"><tt class="py-string">structures.</tt> </tt>
<a name="L13"></a><tt class="py-lineno">13</tt>  <tt class="py-line"><tt class="py-string">"""</tt> </tt>
<a name="L14"></a><tt class="py-lineno">14</tt>  <tt class="py-line"> </tt>
<a name="L15"></a><tt class="py-lineno">15</tt>  <tt class="py-line"><tt id="link-1" class="py-name" targets="Variable pybindgen.settings.automatic_type_narrowing=pybindgen.settings-module.html#automatic_type_narrowing"><a title="pybindgen.settings.automatic_type_narrowing" class="py-name" href="#" onclick="return doclink('link-1', 'automatic_type_narrowing', 'link-1');">automatic_type_narrowing</a></tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L16"></a><tt class="py-lineno">16</tt>  <tt class="py-line"><tt class="py-string">"""</tt> </tt>
<a name="L17"></a><tt class="py-lineno">17</tt>  <tt class="py-line"><tt class="py-string">Default value for the automatic_type_narrowing parameter of C++ classes.</tt> </tt>
<a name="L18"></a><tt class="py-lineno">18</tt>  <tt class="py-line"><tt class="py-string">"""</tt> </tt>
<a name="L19"></a><tt class="py-lineno">19</tt>  <tt class="py-line"> </tt>
<a name="L20"></a><tt class="py-lineno">20</tt>  <tt class="py-line"><tt id="link-2" class="py-name" targets="Variable pybindgen.settings.allow_subclassing=pybindgen.settings-module.html#allow_subclassing"><a title="pybindgen.settings.allow_subclassing" class="py-name" href="#" onclick="return doclink('link-2', 'allow_subclassing', 'link-2');">allow_subclassing</a></tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L21"></a><tt class="py-lineno">21</tt>  <tt class="py-line"><tt class="py-string">"""</tt> </tt>
<a name="L22"></a><tt class="py-lineno">22</tt>  <tt class="py-line"><tt class="py-string">Allow generated classes to be subclassed by default.</tt> </tt>
<a name="L23"></a><tt class="py-lineno">23</tt>  <tt class="py-line"><tt class="py-string">"""</tt> </tt>
<a name="L24"></a><tt class="py-lineno">24</tt>  <tt class="py-line"> </tt>
<a name="L25"></a><tt class="py-lineno">25</tt>  <tt class="py-line"><tt id="link-3" class="py-name" targets="Variable pybindgen.settings.unblock_threads=pybindgen.settings-module.html#unblock_threads"><a title="pybindgen.settings.unblock_threads" class="py-name" href="#" onclick="return doclink('link-3', 'unblock_threads', 'link-3');">unblock_threads</a></tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L26"></a><tt class="py-lineno">26</tt>  <tt class="py-line"><tt class="py-string">"""</tt> </tt>
<a name="L27"></a><tt class="py-lineno">27</tt>  <tt class="py-line"><tt class="py-string">Generate code to support threads.</tt> </tt>
<a name="L28"></a><tt class="py-lineno">28</tt>  <tt class="py-line"><tt class="py-string">When True, by default methods/functions/constructors will unblock</tt> </tt>
<a name="L29"></a><tt class="py-lineno">29</tt>  <tt class="py-line"><tt class="py-string">threads around the funcion call, i.e. allows other Python threads to</tt> </tt>
<a name="L30"></a><tt class="py-lineno">30</tt>  <tt class="py-line"><tt class="py-string">run during the call.</tt> </tt>
<a name="L31"></a><tt class="py-lineno">31</tt>  <tt class="py-line"><tt class="py-string">"""</tt> </tt>
<a name="L32"></a><tt class="py-lineno">32</tt>  <tt class="py-line"> </tt>
<a name="L33"></a><tt class="py-lineno">33</tt>  <tt class="py-line"> </tt>
<a name="ErrorHandler"></a><div id="ErrorHandler-def"><a name="L34"></a><tt class="py-lineno">34</tt> <a class="py-toggle" href="#" id="ErrorHandler-toggle" onclick="return toggle('ErrorHandler');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="pybindgen.settings.ErrorHandler-class.html">ErrorHandler</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ErrorHandler-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="ErrorHandler-expanded"><a name="ErrorHandler.handle_error"></a><div id="ErrorHandler.handle_error-def"><a name="L35"></a><tt class="py-lineno">35</tt> <a class="py-toggle" href="#" id="ErrorHandler.handle_error-toggle" onclick="return toggle('ErrorHandler.handle_error');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.settings.ErrorHandler-class.html#handle_error">handle_error</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">wrapper</tt><tt class="py-op">,</tt> <tt class="py-param">exception</tt><tt class="py-op">,</tt> <tt class="py-param">traceback_</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ErrorHandler.handle_error-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="ErrorHandler.handle_error-expanded"><a name="L36"></a><tt class="py-lineno">36</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L37"></a><tt class="py-lineno">37</tt>  <tt class="py-line"><tt class="py-docstring">        Handles a code generation error.  Should return True to tell</tt> </tt>
<a name="L38"></a><tt class="py-lineno">38</tt>  <tt class="py-line"><tt class="py-docstring">        pybindgen to ignore the error and move on to the next wrapper.</tt> </tt>
<a name="L39"></a><tt class="py-lineno">39</tt>  <tt class="py-line"><tt class="py-docstring">        Returning False will cause pybindgen to allow the exception to</tt> </tt>
<a name="L40"></a><tt class="py-lineno">40</tt>  <tt class="py-line"><tt class="py-docstring">        propagate, thus aborting the code generation procedure.</tt> </tt>
<a name="L41"></a><tt class="py-lineno">41</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L42"></a><tt class="py-lineno">42</tt>  <tt class="py-line">        <tt class="py-keyword">raise</tt> <tt class="py-name">NotImplementedError</tt> </tt>
</div></div><a name="L43"></a><tt class="py-lineno">43</tt>  <tt class="py-line"> </tt>
<a name="L44"></a><tt class="py-lineno">44</tt>  <tt class="py-line"><tt id="link-4" class="py-name" targets="Variable pybindgen.settings.error_handler=pybindgen.settings-module.html#error_handler"><a title="pybindgen.settings.error_handler" class="py-name" href="#" onclick="return doclink('link-4', 'error_handler', 'link-4');">error_handler</a></tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L45"></a><tt class="py-lineno">45</tt>  <tt class="py-line"><tt class="py-string">"""</tt> </tt>
<a name="L46"></a><tt class="py-lineno">46</tt>  <tt class="py-line"><tt class="py-string">Custom error handling.</tt> </tt>
<a name="L47"></a><tt class="py-lineno">47</tt>  <tt class="py-line"><tt class="py-string">Error handler, or None.  When it is None, code generation exceptions</tt> </tt>
<a name="L48"></a><tt class="py-lineno">48</tt>  <tt class="py-line"><tt class="py-string">propagate to the caller.  Else it can be a</tt> </tt>
<a name="L49"></a><tt class="py-lineno">49</tt>  <tt class="py-line"><tt class="py-string">pybindgen.utils.ErrorHandler subclass instance that handles the error.</tt> </tt>
<a name="L50"></a><tt class="py-lineno">50</tt>  <tt class="py-line"><tt class="py-string">"""</tt> </tt>
<a name="L51"></a><tt class="py-lineno">51</tt>  <tt class="py-line"> </tt>
<a name="L52"></a><tt class="py-lineno">52</tt>  <tt class="py-line"><tt id="link-5" class="py-name" targets="Variable pybindgen.settings.min_python_version=pybindgen.settings-module.html#min_python_version"><a title="pybindgen.settings.min_python_version" class="py-name" href="#" onclick="return doclink('link-5', 'min_python_version', 'link-5');">min_python_version</a></tt><tt class="py-op">=</tt><tt class="py-op">(</tt><tt class="py-number">2</tt><tt class="py-op">,</tt> <tt class="py-number">3</tt><tt class="py-op">)</tt> </tt>
<a name="L53"></a><tt class="py-lineno">53</tt>  <tt class="py-line"><tt class="py-string">"""</tt> </tt>
<a name="L54"></a><tt class="py-lineno">54</tt>  <tt class="py-line"><tt class="py-string">Minimum python version the generated code must support.</tt> </tt>
<a name="L55"></a><tt class="py-lineno">55</tt>  <tt class="py-line"><tt class="py-string">"""</tt> </tt>
<a name="L56"></a><tt class="py-lineno">56</tt>  <tt class="py-line"> </tt>
<a name="L57"></a><tt class="py-lineno">57</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-6" class="py-name" targets="Variable pybindgen.cppclass.CppClass.wrapper_registry=pybindgen.cppclass.CppClass-class.html#wrapper_registry,Module pybindgen.wrapper_registry=pybindgen.wrapper_registry-module.html"><a title="pybindgen.cppclass.CppClass.wrapper_registry
pybindgen.wrapper_registry" class="py-name" href="#" onclick="return doclink('link-6', 'wrapper_registry', 'link-6');">wrapper_registry</a></tt> <tt class="py-keyword">import</tt> <tt id="link-7" class="py-name" targets="Class pybindgen.wrapper_registry.NullWrapperRegistry=pybindgen.wrapper_registry.NullWrapperRegistry-class.html"><a title="pybindgen.wrapper_registry.NullWrapperRegistry" class="py-name" href="#" onclick="return doclink('link-7', 'NullWrapperRegistry', 'link-7');">NullWrapperRegistry</a></tt><tt class="py-op">,</tt> <tt id="link-8" class="py-name" targets="Class pybindgen.wrapper_registry.StdMapWrapperRegistry=pybindgen.wrapper_registry.StdMapWrapperRegistry-class.html"><a title="pybindgen.wrapper_registry.StdMapWrapperRegistry" class="py-name" href="#" onclick="return doclink('link-8', 'StdMapWrapperRegistry', 'link-8');">StdMapWrapperRegistry</a></tt> </tt>
<a name="L58"></a><tt class="py-lineno">58</tt>  <tt class="py-line"> </tt>
<a name="L59"></a><tt class="py-lineno">59</tt>  <tt class="py-line"><tt id="link-9" class="py-name"><a title="pybindgen.cppclass.CppClass.wrapper_registry
pybindgen.wrapper_registry" class="py-name" href="#" onclick="return doclink('link-9', 'wrapper_registry', 'link-6');">wrapper_registry</a></tt> <tt class="py-op">=</tt> <tt id="link-10" class="py-name"><a title="pybindgen.wrapper_registry.NullWrapperRegistry" class="py-name" href="#" onclick="return doclink('link-10', 'NullWrapperRegistry', 'link-7');">NullWrapperRegistry</a></tt> </tt>
<a name="L60"></a><tt class="py-lineno">60</tt>  <tt class="py-line"><tt class="py-string">"""</tt> </tt>
<a name="L61"></a><tt class="py-lineno">61</tt>  <tt class="py-line"><tt class="py-string">A L{WrapperRegistry} subclass to use for creating</tt> </tt>
<a name="L62"></a><tt class="py-lineno">62</tt>  <tt class="py-line"><tt class="py-string">wrapper registries.  A wrapper registry ensures that at most one</tt> </tt>
<a name="L63"></a><tt class="py-lineno">63</tt>  <tt class="py-line"><tt class="py-string">python wrapper exists for each C/C++ object.</tt> </tt>
<a name="L64"></a><tt class="py-lineno">64</tt>  <tt class="py-line"><tt class="py-string">"""</tt> </tt>
<a name="L65"></a><tt class="py-lineno">65</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="pybindgen-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Sun Jul 12 17:23:43 2009
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
